home *** CD-ROM | disk | FTP | other *** search
/ Openstep 4.2 (Developer) / Openstep Developer 4.2.iso / NextDeveloper / Examples / AppKit / Lines / LinesView.h < prev    next >
Encoding:
Text File  |  1997-01-13  |  813 b   |  32 lines

  1. /*
  2.  * LinesView.h, a small sample view demonstrating use of timers and userpaths.
  3.  */
  4.  
  5. #import <AppKit/NSView.h>
  6. #import "UserPath.h"
  7.  
  8. #define MINNUMCORNERS 2
  9. #define MAXNUMCORNERS 20
  10.  
  11. @interface LinesView : NSView {
  12.     BOOL running;            // Whether we are animating or not.
  13.     BOOL userPathNeedsUpdating;        // Whether the userPath object has uptodate points
  14.     NSTimer *linesTimer;
  15.     struct cornerStruct {
  16.     int xLoc, yLoc;
  17.     int xVel, yVel;
  18.     } corners[MAXNUMCORNERS];        // Corners and velocities for our polygon
  19.     int numCorners;            // Number of corners we actually have
  20.     UserPath *userPath;
  21. }
  22.  
  23. - (id)initWithFrame:(NSRect)rect;
  24. - (void)dealloc;
  25. - (void)toggleRun:sender;
  26. - (void)setNumberOfCorners:sender;
  27. - (void)drawUserPath:(NSColor *)color;
  28. - (NSColor *)lineColor;
  29. - (NSColor *)backgroundColor;
  30.  
  31. @end
  32.